package com.loong.order.common.forehead.param;

import com.loong.common.validator.group.CommonInsert;
import com.loong.common.validator.group.CommonUpdate;
import lombok.*;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Description: 订单基础参数
 * @Author: hzp
 * @Date: 2020-12-31 9:53
 */
@Builder
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
public class OrderBaseForeheadParam {
    @NotNull(message = "更新时订单的id不能为空",groups = {CommonUpdate.class})
    private Long id;

    /**
     * 店铺 id
     */
    private Long shopId;

    /**
     * 总包装费
     */
    private BigDecimal foodBoxFee;

    /**
     * 订单号
     */
    private String orderNumber;

    /**
     * 下单时间
     */
    private Date createOrderTime;

    /**
     * 期望送达时间
     */
    private Date expectTime;

    /**
     * 总价(sku总价)
     */
    @NotNull(message = "新增时总价(sku总价)不能为空",groups = {CommonInsert.class})
    private BigDecimal totalPrice;

    /**
     * 订单状态
     */
    private Integer status;

    /**
     * 配送费
     */
    @NotNull(message = "新增时配送费不能为空",groups = {CommonInsert.class})
    private BigDecimal postFee;

    /**
     * 优惠金额
     */
    private BigDecimal discountPrice;

    /**
     * 实付金额
     */
    @NotNull(message = "新增时实付金额不能为空",groups = {CommonInsert.class})
    private BigDecimal payment;

    /**
     * 支付类型
     */
    @NotBlank(message = "新增时支付类型不能为空",groups = {CommonInsert.class})
    private String paymentType;

    /**
     * 付款时间
     */
    private Date paymentTime;

    /**
     * 发货时间
     */
    private Date deliveryTime;

    /**
     * 交易完成时间
     */
    private Date endTime;

    /**
     * 交易结束时间
     */
    private Date closeTime;

    /**
     * 买家id
     */
    @NotNull(message = "新增时买家id不能为空",groups = {CommonInsert.class})
    private Long userId;

    /**
     * 买家昵称
     */
    private String userNick;

    /**
     * 买家是否评论
     */
    private Boolean commentFlag;

    /**
     * 买家是否自取 默认不自取吧
     */
    private Boolean inviteFlag = false;

    /**
     * 自取时间
     */
    private Date inviteTime;

    /**
     * 订单备注
     */
    private String orderRemark;

}
